﻿using Mimi.Models.DataModels;
using Mimi.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Mimi.Models.UIModels
{
    public class UIIncome : BindingBase
    {
        #region Properties
        private string incomeId;
        /// <summary>
        /// Income Id
        /// </summary>
        public string IncomeId
        {
            get { return incomeId; }
            set
            {
                Set(ref incomeId, value);
            }
        }

        private string amount;
        /// <summary>
        /// Amount
        /// </summary>
        public string Amount
        {
            get { return amount; }
            set
            {
                Set(ref amount, value);
            }
        }

        private string budget;
        /// <summary>
        /// Budget
        /// </summary>
        public string Budget
        {
            get { return budget; }
            set
            {
                Set(ref budget, value);
            }
        }

        private string date;
        /// <summary>
        /// Add Date
        /// </summary>
        public string Date
        {
            get { return date; }
            set
            {
                Set(ref date, value);
            }
        }
        #endregion

        #region Methods
        /// <summary>
        /// Default constructor
        /// </summary>
        public UIIncome()
        {

        }

        /// <summary>
        /// Parameter constructor
        /// </summary>
        /// <param name="income"></param>
        public UIIncome(Income income)
        {
            this.IncomeId = income.IncomeId;
            this.Amount = income.Amount.ToString();
            this.Budget = income.Budget;
            this.Date = income.Date.ToShortDateString();
        }
        #endregion
    }
}
